<?php

/**
 * AdminConfig form base class.
 *
 * @method AdminConfig getObject() Returns the current form's model object
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 */
abstract class BaseAdminConfigForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'        => new sfWidgetFormInputHidden(),
      'param'     => new sfWidgetFormInputText(),
      'value'     => new sfWidgetFormTextarea(),
      'branch_id' => new sfWidgetFormPropelChoice(array('model' => 'Branch', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'id'        => new sfValidatorPropelChoice(array('model' => 'AdminConfig', 'column' => 'id', 'required' => false)),
      'param'     => new sfValidatorString(array('max_length' => 255)),
      'value'     => new sfValidatorString(),
      'branch_id' => new sfValidatorPropelChoice(array('model' => 'Branch', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('admin_config[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AdminConfig';
  }


}
